window.BusinessListView = Backbone.View.extend({

    tagName:'ul',

    initialize:function () {
        this.model.bind("reset", this.render, this);
        var self = this;
        this.model.bind("add", function (business) {
            $(self.el).prepend(new BusinessListItemView({model:business}).render().el);
        });
    },

    render:function (eventName) {
        _.each(this.model.models, function (business) {
            $(this.el).attr('id',"navWrapper").prepend(new BusinessListItemView({model:business}).render().el);
        }, this);
        return this;
    }
});